interface T1 {
    a: string
    c: number
}

interface T2 {
    [k: string]: any
    a: string
    c: number
}

// 一般用法
type T3 = T1['a'] // 单类型, subtype of string|number|symbol

// T[K] 中，T是表达式
let x = {a: 1, b: 2}
type T4 = typeof x['a'] // number, 这里表达式的优先级高于索引存取，先求值T再确认K
type T5 = T1['a']['toString'] 
type T6 = (keyof T2)['toString']

// T[K]中, K是表达式
type X = T1 & T2 // 交叉
// type T7 = T1[X] // X必须是T1的子类型

type T8 = T1['a'|'c'] // 联合 T['a'] | T['c']

// 其它1: T[K]中, T是特殊的单类型
type S1 = any['a'] // any
type S2 = never['toString'] // never

// 其它2: T[K]中, T是包装类型
type S3 = 'a'['toString'] // 相当于 ('a' as String)['toString']
type S4 = string['toString']
type S5 = String['toString'] 
type S51 = Exclude<keyof String, never>
type S6 = 1['toString']

// 其它3: T[K]中, T是枚举类型
enum T10 {
    a,b,c,d='abc'
}
type T11 = keyof T10
type T12 = T10['toString']